﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace GameLib1
{
    class TextureManager
    {
        public static TextureManager current = new TextureManager();
        Dictionary<String, Texture2D> mTextures = new Dictionary<String, Texture2D>();
        
        private TextureManager() { }

        public void Add(String name, Texture2D texture)
        {
            mTextures.Add(name, texture);
        }

        public Texture2D texture(String name)
        {
            if (name == null)
                return null;

            if (mTextures.ContainsKey(name))
                return mTextures[name];
            return null;
        }


    }
}
